<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>::Patani Forum:: Upload Gallery</title>
</head>
<script type="text/javascript">
function add_album()
{
	if(document.getElementById('dia_gallery_uploadAlbumName').value == "")
	{
		alert("กรุณาระบุชื่ออัลบั้ม");
		return;
	}
	else if(document.getElementById('dia_gallery_uploadAlbumPhotographer').value == "")
	{
		alert("กรุณาระบุช่างภาพ");
		return;
	}
	else
	{
		document.getElementById("album_name").value = document.getElementById("dia_gallery_uploadAlbumName").value;
		document.getElementById("album_description").value = document.getElementById("dia_gallery_uploadAlbumDescription").value;		
		document.getElementById("album_photographer").value = document.getElementById("dia_gallery_uploadAlbumPhotographer").value;
		document.forms["formSubmit"].submit();
	}
}
</script>
<body>
	<h2>สร้าง Album</h2>
	ชื่ออัลบั้ม : <input type="text" id="dia_gallery_uploadAlbumName" name="dia_gallery_uploadAlbumName"/><br/>
	คำอธิบาย : <input type="text" id="dia_gallery_uploadAlbumDescription" name="dia_gallery_uploadAlbumDescription"/><br/>
	ผู้ถ่าย: <input type="text" id="dia_gallery_uploadAlbumPhotographer" name="dia_gallery_uploadAlbumPhotographer"/><br/>
	<input type="submit" value="Submit"onClick="add_album()"></input>
<form id="formSubmit" action="../command/image/insertAlbum.php" method="post">
<input type="hidden" id="album_name" name="album_name"/>
<input type="hidden" id="album_description" name="album_description"/>
<input type="hidden" id="album_photographer" name="album_photographer"/>	
</form>
</body>
</html>

